home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks96
/
InternetChooser.sit
/
Internet Chooser
/
Sample LDEFs 2.0
/
(Sys 7) Icon LDEF
/
Tester Src
/
List.c
< prev
next >
Wrap
Text File
|
1993-10-22
|
1KB
|
53 lines
// File "List.c"
#include <Icons.h>
#include "main.h"
#include "List.h"
extern WindowPtr gWindow;
extern ListHandle gList;
// * **************************************************************************** * //
// * **************************************************************************** * //
void CreateList() {
Cell theCell;
Rect destRect, cellRect;
GrafPtr savePort;
Handle iconHdl;
Str63 textBuff;
GetPort(&savePort);
SetPort(gWindow);
destRect = gWindow->portRect;
destRect.right -= 15;
destRect.bottom -= 15;
SetRect(&cellRect, 0, 0, 1, 0);
theCell.h = 120; theCell.v = 54;
TextFont(1); TextSize(9); TextFace(bold);
gList = LNew(&destRect, &cellRect, theCell, 130, gWindow, 0, -1, -1, -1);
LAddRow(6, 0, gList);
for(theCell.h = theCell.v = 0; theCell.v < (*gList)->dataBounds.bottom; theCell.v++) {
GetIconSuite(&iconHdl, 1001 + theCell.v, svAllAvailableData);
LSetCell(&iconHdl, 4, theCell, gList);
LAddToCell("Cell ", sizeof("Cell "), theCell, gList);
NumToString(theCell.v, textBuff);
LAddToCell(textBuff+1, textBuff[0], theCell, gList);
}
LDoDraw(-1, gList);
SetPort(savePort);
}
// * **************************************************************************** * //
// * **************************************************************************** * //
void DisposeList() {
LDispose(gList);
}